package com.winning.util.excelutil.service.impl;

import com.winning.util.excelutil.demo.ExportInfo;
import com.winning.util.excelutil.entity.EpidemicMasterEntity;
import com.winning.util.excelutil.excel.ExcelUtil;
import com.winning.util.excelutil.service.ExportService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * @作者：caopengfei
 * @时间：2020/2/12
 */
@Service
public class ExportServiceImpl implements ExportService {

    @Override
    public void exportEpidemicMaster(HttpServletResponse response) {
        EpidemicMasterEntity epidemicMasterEntity = new EpidemicMasterEntity();
        epidemicMasterEntity.setYljgdm("北京");
        epidemicMasterEntity.setSjdm("20200212");
        List<EpidemicMasterEntity> list = new ArrayList<>();
        list.add(epidemicMasterEntity);
        ExcelUtil.writeExcel(response, list, "疫情数据填报表", "疫情数据填报表", new EpidemicMasterEntity());
    }
}
